<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字符串大小写转换</title>
</head>
<body>
    <button onclick="convertToUpperCase()">转换为大写</button>
    <button onclick="convertToLowerCase()">转换为小写</button>
    <p id="result"></p>

    <script>
        function convertToUpperCase() {
            var str = "www.jb51.ITCASE.CN";
            var upperCaseStr = str.toUpperCase();
            document.getElementById("result").innerHTML = upperCaseStr;
        }

        function convertToLowerCase() {
            var str = "www.jb51.ITCASE.CN";
            var lowerCaseStr = str.toLowerCase();
            document.getElementById("result").innerHTML = lowerCaseStr;
        }
    </script>
</body>
</html>